package com.common.config;

import com.common.constant.SharesConstan;
import com.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
public class SharesConfig {


    @Autowired
    private ShareHolderService shareHolderService;

    /**
     * 初始化
     */
    @PostConstruct
    public void getSharesInit() {
        if(SharesConstan.FLAG){
            return;
        }
        System.out.println("初始化数据 start");
        shareHolderService.init();
        System.out.println("初始化数据 end");

        System.out.println("查询资金流向 start");
        shareHolderService.getzjlx();
        shareHolderService.gethyssl();
        System.out.println("查询资金流向 end");
    }

}
